package top.firejames.bean;

import top.firejames.util.FileConstant;

/**
 * 分片文件
 */
public class SliceFile {

    //分片文件名称
    private String name;

    //分片文件路径
    private String path;

    //分片文件读行索引
    private int index = 0;

    //分片文件总行
    private int totalLine = 0;

    public SliceFile(String name) {
        this.name = name;
    }

    public SliceFile(String name, int totalLine) {
        this(name);
        this.totalLine = totalLine;
        this.path = FileConstant.FILE_PATH + "\\" + name + FileConstant.FILE_SUFFIX;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public String toString() {
        return "SliceFile{" +
                "name='" + name + '\'' +
                ", path='" + path + '\'' +
                ", index=" + index +
                ", totalLine=" + totalLine +
                '}';
    }
}
